#include <stdio.h>
#include <vector>
#include <algorithm>
#include <map>

using namespace std;

int main() {
    int N = 0;
    scanf("%d", &N);

    vector<int> X(N);
    vector<int> Y(N);
    for (int i = 0; i < N; ++i) {
        int x, y;
        scanf("%d %d", &x, &y);
        X[i] = x;
        Y[i] = y;
    }

    map<int, int> m;
    for (int i = 0; i < N; ++i) {
        int level = 0;
        for (int j = 0; j <= i; ++j) {
            if (i ==j)
                continue;

            if (X[i] >= X[j] && Y[i] >= Y[j])
                ++level;
        }
        ++m[level];
    }

    for (int i = 0; i < N; ++i)
        printf("%d\n", m[i]);

    return 0;
}
